package com.ninthgroup.controller;

import com.ninthgroup.entity.Admin;
import com.ninthgroup.service.AdminService;
import com.ninthgroup.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：1452863884@qq.com rcg
 * @date ：Created in 2022/10/21 20:22
 * @description：管理员用户控制层
 * @modified By：
 * @version:1.0
 */
@RestController
@RequestMapping("/admin")
public class AdminController {

    @Autowired
    private AdminService adminService;

    @GetMapping("/findOne")
    public Result findOne(Integer aId){
        return adminService.findOneById(aId);
    }

    @PostMapping("/update")
    public Result update(@RequestBody Admin admin){
        return adminService.update(admin);
    }
}